package com.datang.pet.api.goodsController;/*
 * @auther 顶风少年
 * @mail dfsn19970313@foxmail.com
 * @date 2019-07-11 22:25
 * @notify
 * @version 1.0
 */

import com.datang.pet.common.response.Result;
import com.datang.pet.service.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class GoodsController {
    @Autowired
    private GoodsService goodsService;

    @GetMapping("/getGoodsList")
    public Result getGoodsList()throws Exception{
        return Result.ok(goodsService.getGoodsList());
    }

    @GetMapping("/getGoodsInfo")
    public Result getGoodsInfo(String goodsId)throws Exception {
        return Result.ok(goodsService.getGoodsInfo(goodsId));
    }
}
